package com.hypo.business.controller;

import com.hypo.business.domain.Result;
import com.hypo.business.domain.vo.PcdVo;
import com.hypo.business.service.PcdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/pcd")
public class PcdController
{
    @Autowired
    private PcdService pcdService;

    /**
     * 查询省市区列表
     */
    @GetMapping
    public Result list()
    {
        List<PcdVo> list = pcdService.getAll();
        return Result.success(list);
    }

}
